extends MeshInstance3D


# Called when the node enters the scene tree for the first time.
@export var ly:int =0
var cz1:Material
var gdy:float = 0.0
var gdx:float = 0.0
var gd:float = ly
func _ready() -> void:
	var tc:int = ly * -1
	cz1 = load("res://Files/StageMap/stage"+str(GameData.GameStage)+"/world"+str(tc)+".tres")
	mesh.material = cz1
	pass # Replace with function body.


# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
	gdy=gdy-0.002
	gdx=gdx-0.2 * gd * 0.05
	get_active_material(0).uv1_offset=Vector3(gdx,gdy,0.0)
	get_active_material(0).uv1_scale=Vector3(7,7,3)
	pass
